Since the introduction of fixed block hard disk architecture more than twenty years ago, the standard size of a disk block, or data sector, has remained unchanged, typically at 512 bytes with some special application drives at 520 and 528. As the recording density of disk drives continues to increase, the amount of physical space that a sector occupies continues to shrink as a consequence. However, as understood by the present invention the size of physical defects on the magnetic media, such as scratches and contaminants, does not shrink in similar proportion, if at all. As a result, the present invention understands that when defects occur within a sector, a greater fraction of its data becomes corrupted as compared to older, less dense drives.
To combat this effect, a more powerful error correction code (ECC) method is required. However, a more powerful ECC requires more redundancy, which means an increasing percentage of a disk's storage space is required for ECC rather than storing user data. As understood herein, to avoid this decrease in data formatting efficiency, the more powerful ECC can be applied to a larger block size so as to amortize the increased redundancy over a larger number of bytes. Furthermore, regardless of how powerful an ECC is, a substantial portion of a data block must be error free for correction to work. The greater the number of bytes a defect spans, the larger the data block must be. For these reasons, the present invention recognizes that the standard block size should be increased to, e.g., four kilobytes (4 KB). It is to be understood that while 4 KB is used for discussion here, the present invention is not limited to such block size.
One way to effect this change would be to change the current industry standard interface of 512 bytes to 4 KB. Unfortunately, this would require widespread changes to operating system software and BIOS firmware.
Another way to effect the change is to make disk drives that internally implement a 4 KB ECC block size. Externally, the interface can remain at today's 512 byte block size, with the drives emulating the 512 byte block size interface. The present invention recognizes that such an emulation can be straightforward and simple. More particularly, on a read command the drive simply reads those native 4 KB blocks containing the requested 512 byte blocks, and then returns the requested data to the host. On a write command, if the write data happens to be some multiple of 4 KB and the data happens to be aligned at a native 4 KB block boundary, then ECC can be simply generated for the new data and written to the disk. However, as understood herein if either of these two conditions are not met, then the beginning and/or the end of the new data lies partially within a native 4 KB block of the HDD, in which case the drive must first read the leading 4 KB block and/or the trailing 4 KB block, insert the new data into the block(s), generate ECC for the modified block(s), and write all the new blocks to the disk. Such a read-modify-write procedure, requiring, as it does, an extra drive revolution, reduces drive performance.
With more particularity, there are two methods for implementing 4 KB ECC block in a HDD. The first method is to increase the native sector size from 512 bytes to 4 KB, with the sector ECC for the 4 KB sector enhanced over that for the 512 byte sector. To a host that still uses a 512 byte sector interface, such a 4 KB sector is logically eight 512 byte logical sectors. A 4 KB block of this method is referred to herein as a “native 4 KB block”. A second method is to retain the native sector size of 512 bytes, and apply increasing levels of ECC to increasing numbers of aggregates of such sectors. An example would be to call the sector ECC associated with each native 512 byte sector the first level ECC; a second level and more powerful ECC would be computed for and added to a group of 4 consecutive sectors; yet a third level and even more powerful ECC would be computed for and added to a group of eight consecutive sectors. Such a multilevel ECC method, using any number of levels and any number of sectors per level, is called the “Integrated Sector Format” (ISF). A group of eight consecutive 512 byte ISF sectors would form a 4 KB ECC block (associated with the third level ECC in the example given). Such a 4 KB block is referred to herein as an “ISF 4 KB block”.
As recognized by the present invention, even though it is possible to access the native 512 byte sectors individually, an ISF block must be updated as a whole in order to properly maintain the full multilevel of ECCs. The invention disclosed herein is applicable to both of the above-mention types of 4 KB ECC blocks, with some of the present features applicable to ISF 4 KB block only. In the following, a “block” means either native 4 KB block or ISF 4 KB block, unless specified otherwise.